package com.suxin.datahub.core;

import com.suxin.datahub.core.reader.Reader;
import com.suxin.datahub.core.writer.Writer;

import java.util.List;
import java.util.Map;

/**
 * @Classname BaseReaderWriter
 * @Description [ BaseReaderWriter ]
 * @Author Tang
 * @Date 2020/11/11 13:16
 * @Created by ASUS
 */
public class BaseReaderWriter implements ReaderWriter{

    @Override
    public long execute(Reader reader, Writer writer) {
        List<Map<String, Object>> datas = reader.readData();
        return writer.batchWriterData(datas);
    }
}